home *** CD-ROM | disk | FTP | other *** search
- on activaNiveles
- global cal_1, cal_2, cal_3, vida, escudo, cinta, pase
- repeat with xx = 28 to 32
- puppetSprite(xx, 1)
- end repeat
- set Pos to the number of cast "NIV_00.PIC"
- if vida = 0 then
- set the castNum of sprite 28 to Pos
- else
- set the castNum of sprite 28 to Pos + integer((12 * float(vida) / float(max_vida)) + 0.40000000000000002)
- end if
- if escudo = 0 then
- set the castNum of sprite 29 to Pos
- else
- set the castNum of sprite 29 to Pos + integer((12 * float(escudo) / float(max_escudo)) + 0.40000000000000002)
- end if
- if cal_1 = 0 then
- set the castNum of sprite 30 to Pos
- else
- set the castNum of sprite 30 to Pos + integer((12 * float(cal_1) / float(max_cal_1)) + 0.40000000000000002)
- end if
- if cal_2 = 0 then
- set the castNum of sprite 31 to Pos
- else
- set the castNum of sprite 31 to Pos + integer((12 * float(cal_2) / float(max_cal_2)) + 0.40000000000000002)
- end if
- if cal_3 = 0 then
- set the castNum of sprite 32 to Pos
- else
- set the castNum of sprite 32 to Pos + integer((12 * float(cal_3) / float(max_cal_3)) + 0.40000000000000002)
- end if
- if pase = 1 then
- set the visible of sprite 33 to 1
- else
- set the visible of sprite 33 to 0
- end if
- if cinta = 1 then
- set the visible of sprite 34 to 1
- else
- set the visible of sprite 34 to 0
- end if
- end
-
- on minimos
- global cal_1, cal_2, cal_3, vida, escudo
- if cal_1 < 50 then
- set cal_1 to 50
- end if
- if cal_2 < 20 then
- set cal_2 to 20
- end if
- if cal_3 < 10 then
- set cal_3 to 10
- end if
- if vida < 60 then
- set vida to 60
- end if
- if escudo < 30 then
- set escudo to 30
- end if
- end
-
- on cambiaNivel
- global ProgInit, Niv, Primero, Punto, cal_1, cal_2, cal_3, vida, escudo
- set CodTecla to the keyCode
- if (CodTecla > 81) and (CodTecla <= 89) then
- set Niv to CodTecla - 82
- go("CambiaNivel", ProgInit)
- exit
- else
- if CodTecla = 78 then
- set cal_1 to 99
- set cal_2 to 99
- set cal_3 to 99
- set vida to 99
- set escudo to 99
- activaNiveles()
- else
- if CodTecla = 66 then
- preLoad(Primero + Punto)
- go(Primero + Punto)
- end if
- end if
- end if
- end
-